# Contributor: Sören Tempel <soeren+alpine@soeren-tempel.net>
# Maintainer: Sören Tempel <soeren+alpine@soeren-tempel.net>
pkgname=libnftnl
pkgver=1.1.7
pkgrel=0
pkgdesc="Netfilter library providing interface to the nf_tables subsystem"
url="https://netfilter.org/projects/libnftnl"
arch="all"
license="GPL-2.0-or-later"
depends_dev="libmnl-dev"
makedepends="$depends_dev bash jansson-dev"
subpackages="$pkgname-dev $pkgname-libs"
source="https://netfilter.org/projects/libnftnl/files/libnftnl-$pkgver.tar.bz2"

case "$CARCH" in
	s390x) options="!check" ;; # FIXME
esac

build() {
	cd "$builddir"
	./configure \
		--build=$CBUILD \
		--host=$CHOST \
		--prefix=/usr \
		--sysconfdir=/etc \
		--mandir=/usr/share/man \
		--localstatedir=/var \
		--with-json-parsing
	make
}

check() {
	cd "$builddir"/tests
	make check
}

package() {
	cd "$builddir"
	make DESTDIR="$pkgdir" install
}

sha512sums="80fd09147b1e2c1533cc2c8347d35137ff94f14118d5ba7bf3c1fbd0a226f6443560d5eca03273129e091b3442f820cd24455e72e917a8b7fedc8f3c9b6dc407  libnftnl-1.1.7.tar.bz2"
